function main() {
    // 方式1
  	// 获取路由参数
    let query = this.$route.query;
    console.log(query);

  	// 方式2
    let location = window.location;
    // 拿到问号后的字符串
    query = location.href.match(/(?<=\?.*).+/g) || [];
    // 根据 & 拆分
    if (query.length > 0) {
        let params = {};
        let paramArr = query[0].split("&");
        paramArr.forEach((p) => {
            // 等号拆分
            let kv = p.split("=");
            params[kv[0]] = decodeURI(kv[1] || "");
        });
        console.log(params);
    }
}